* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

header h1 {
    color: #333;
    font-size: 2.5rem;
    font-weight: bold;
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.player-info {
    display: flex;
    gap: 20px;
}

.player {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.player.active {
    background-color: #e6f7ff;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.piece {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.piece.black {
    background-color: #000;
}

.piece.white {
    background-color: #fff;
    border: 1px solid #ccc;
}

.status {
    font-weight: bold;
    font-size: 1.1rem;
    color: #1890ff;
}

.board-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

#board {
    background-color: #e6c88e;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

button {
    padding: 10px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

#restart {
    background-color: #1890ff;
    color: white;
}

#restart:hover {
    background-color: #0c7cd5;
}

#undo {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #d9d9d9;
}

#undo:hover {
    background-color: #e6e6e6;
}

.game-rules {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
}

.game-rules h2 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #333;
}

.game-rules p {
    margin-bottom: 5px;
    color: #666;
}

/* 胜利弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
}

#win-message {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #1890ff;
}

#new-game {
    background-color: #52c41a;
    color: white;
    padding: 12px 25px;
    font-size: 1.1rem;
}

#new-game:hover {
    background-color: #389e0d;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    #board {
        width: 100%;
        height: auto;
    }
    
    .game-info {
        flex-direction: column;
        gap: 15px;
    }
    
    .controls {
        flex-direction: column;
        gap: 10px;
    }
    
    button {
        width: 100%;
    }
}